
function GetQueryString(name) {
    var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
    var r = window.location.search.substr(1).match(reg);
    if (r !== null) return unescape(r[2]); return null;
}
var deputeID = GetQueryString("id");
//显示基本信息
var basicInfomation = document.getElementById("basicInfomation").children[0];
var basicInfomationData = [["项目名称", "哇啊啊啊"], ["委托单位", "哇啊啊啊"], ["产品名称", "哇啊啊啊"],
    ["产品编号", "哇啊啊啊"], ["检测时间", "哇啊啊啊"], ["检测标准", "哇啊啊啊"]];
for (let i = 0; i < basicInfomationData.length; i++) {
    let tr = document.createElement("tr");
    if (i % 3 === 0) {
        basicInfomation.appendChild(tr);
    }
    let td = document.createElement("td");
    td.setAttribute("class", "td-shadows");
    td.setAttribute("align", "center");
    td.innerHTML = basicInfomationData[i][0];
    basicInfomation.children[basicInfomation.childElementCount - 1].appendChild(td);
    td = document.createElement("td");
    td.setAttribute("align", "center");
    td.innerHTML = basicInfomationData[i][1];
    basicInfomation.children[basicInfomation.childElementCount - 1].appendChild(td);
}

//显示工艺信息
var techEdition = "哇啊啊";
var techID = "哇啊啊啊";
var techInfomation = document.getElementById("techInfomation");
techInfomation.children[1].innerHTML = techEdition;
techInfomation.children[3].innerHTML = techID;

var techTable = document.getElementById("techTable").children[0];
var techData = [["哇啊啊啊", "哇啊啊啊", "哇啊啊啊", "哇啊啊啊", "哇啊啊啊", "哇啊啊啊", "哇啊啊啊", "哇啊啊啊", "哇啊啊啊", "哇啊啊啊"]];
for (let i = 0; i < techData.length; i++) {
    let inner = "";
    for (let j = 0; j < techData[0].length; j++)
        inner += "<td align=\"center\">" + techData[i][j] + "</td>";
    let line = document.createElement("tr");
    line.innerHTML = inner;
    techTable.appendChild(line);
}

//显示统计信息
var statNum = [10000, 1000];
var statInfomation = document.getElementById("statInfomation");
statInfomation.children[1].innerHTML = statNum[0];
statInfomation.children[3].innerHTML = statNum[1];

var statTable = document.getElementById("statTable");
var statData = [[1, 2, 3, 4], [5, 6, 7, 8]];
for (let i = 0; i < statData.length; i++) {
    for (let j = 0; j < statData[0].length; j++) {
        statTable.children[0].children[i + 1].children[j + 1].innerHTML = statData[i][j];
    }
}

//显示工件信息
var workpieceTable = document.getElementById("workpieceTable");
var workpieceInfomation = [["FL032D-F034-023", "1-2", "105", "O108x6", "xxx型", "合格", "这个还行"]];
for (let i = 0; i < workpieceInfomation.length; i++) {
    let tr = document.createElement("tr");
    let inner = "";
    for (let j = 0; j < workpieceInfomation[0].length; j++) {
        inner += "<td>" + workpieceInfomation[i][j] + "</td>";
    }
    tr.innerHTML = inner;
    workpieceTable.children[1].appendChild(tr);
}